package collection;

public abstract class ANode<T> implements INode<T>{

	protected T element;
	
	protected HashTableMap<String,Object> fieldMap; 

	ANode()
	{
		this.element = null;
	}
	
	ANode(T element)
	{
		this.element = element;
	}
	
	@Override
	public T getElement()
	{
		return this.element;
	}
	
	@Override
	public void setElement(T element)
	{
		this.element = element;
	}
	
	@Override
	public void clear()
	{
		this.element = null;
	}
	
	@Override
	public String toString()
	{
		return this.element==null ? "" : this.element.toString();
	}
	
	public boolean equals(ANode<T> other)
	{
		return this.element.equals(other.element);
	}
	
}
